//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

$this->stime = $this->_param('starttime') ? strtotime($this->_param('starttime')):D('integral_log') -> where(array('site_id' => __SITEID__,'member_id' => $this->memberInfo['id'])) -> order('time asc') -> getField('time');//时间



//totals to sources of integral(A,B,V)
$anti=D('event')->where($map)->group("integraltypeid")->getfield("integraltypeid,sum(integralnumber) as sum",'true');
$this->assign('anti',$anti);
//integral a
$inta=D('event')->alias('e')->join('think_form as f on e.form_id = f.id')->where('e.integraltypeid = 30 and member_id ='.$this->memberInfo['id'])->group('form_id')->field('e.*,f.name as formname,sum(e.integralnumber) as total')->select();
$this->assign('inta',$inta);
$this->assign('inta1',$inta);
//integral b
$intb=D('event')->alias('e')->join('think_form as f on e.form_id = f.id')->where('e.integraltypeid = 10 and member_id ='.$this->memberInfo['id'])->group('form_id')->field('e.*,f.name as formname,sum(e.integralnumber) as total')->select();
$this->assign('intb',$intb);
$this->assign('intb1',$intb);

//integral v
$intv=D('event')->alias('e')->join('think_form as f on e.form_id = f.id')->where('e.integraltypeid = 34 and member_id ='.$this->memberInfo['id'])->group('form_id')->field('e.*,f.name as formname,sum(e.integralnumber) as total')->select();
$this->assign('intv',$intv);
$this->assign('intv1',$intv);

///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////